<?php

class Zend_View_Helper_Jsvariables extends Zend_View_Helper_Abstract {

    public function jsvariables() {
        return $this->generateJSVariables();
    }

    public function generateJSVariables() {
        $js = "<script type=\"text/javascript\">\n";
        $js .= "$(document).ready(function() {\n";
        $js .= "controller = \"" . Zend_Controller_Front::getInstance()->getRequest()->getControllerName() . "\";\n";
        $js .= "action = \"" . Zend_Controller_Front::getInstance()->getRequest()->getActionName() . "\";\n";
        $js .= "console.warn(\"sfsfsdfsfs\")";       
        $js .= " });\n";        
        $js .= "</script>\n"; 
        return $js;
    }

}
?>